package co.com.colcomercio.util;

import java.io.File;
import java.io.FileInputStream;
import java.util.Properties;

import co.com.colcomercio.util.constants.GeneralConstants;


public class ManejoParam {
	
	public static String RUTAPROP = null;
	
	private static Properties properties = new Properties();
	
	public static String getParam(String key) throws Exception
	{
		try
		{
			if(new File(RUTAPROP).exists())
				properties.load(new FileInputStream(RUTAPROP));
			else
				throw new Exception("La ruta del archivo de propiedades no es valida");						
			
			return properties.getProperty(key)!=null?properties.getProperty(key):GeneralConstants.BLANK;
		}
		catch(Exception ex)
		{
			throw ex;
		}
	}
	
	
}